﻿
//等待框
var WaitSchedulebar = {
    show: function (sTitle, bCanNotCancel, sImageUrl, sBkColor) {
        var oFloatAlarm = $$("FloatAlarm");
        var oFloatText = $$("DataLoadingText");
        var oFloatSpace = $$("FloatSpace");
        var oFloatCancel = $$("FloatAlarm_CancelBtn");
        var oFloatCell = $$("FloatAlarm_TD");

        if (oFloatAlarm.length) oFloatAlarm = oFloatAlarm[0];
        if (oFloatText.length) oFloatText = oFloatText[0];
        if (oFloatSpace.length) oFloatSpace = oFloatSpace[0];
        if (oFloatCancel.length) oFloatCancel = oFloatCancel[0];
        if (oFloatCell.length) oFloatCell = oFloatCell[0];

        if (!sTitle) sTitle = "正在加载数据......";

        if (sTitle) oFloatText.innerHTML = '<b>' + sTitle + '</b>';
        if (sImageUrl) oFloatImage.src = sImageUrl;
        if (sBkColor) oFloatCell.style.backgroundColor = sBkColor;

        oFloatAlarm.style.height = document.body.offsetHeight * 0.99;
        oFloatAlarm.style.width = document.body.offsetWidth * 0.99;
        oFloatAlarm.style.posTop = document.body.scrollTop;
        oFloatAlarm.style.posLeft = document.body.scrollLeft;
        oFloatSpace.style.height = document.body.offsetHeight / 3;

        //是否可以进行取消操作
        if (bCanNotCancel)
            oFloatCancel.style.display = "none";
        else
            oFloatCancel.style.display = "";

        oFloatAlarm.style.display = '';
    },
    hide: function () {
        $$("FloatAlarm").style.display = 'none';
    }
};
